package br.ufpe.cin.imlm2.util;

import java.util.Collection;

public interface Filter<T> {

	/**
	 * Tells whether or not this filter retains object <code>t</code>.
	 * 
	 * @param t
	 * @return
	 */
	public abstract boolean retains(T t);

	/**
	 * Returns a new collection containing only the objects not retained by this
	 * filter. An object will be retained if this filter <code>retains</code>
	 * method returns true;
	 * 
	 * @param collection
	 * @return
	 */
	public abstract Collection<T> filter(Collection<T> collection);

}